package org.ellwood.core.common.exception.common;

import java.io.Serial;

/**
 * @ProjectName: ellwood-boot-pro
 * @PackageName: org.ellwood.core.common.exception.common
 * @ClassName: BaseException
 * @Description: // 基础异常
 * @Author: Ellwood
 * @CreateDate: 2024/6/12 - 下午2:05
 * @Version: V1.0.0
 */
public class BaseException extends RuntimeException {

    @Serial
    private static final long serialVersionUID = 1L;

    private final IResponseEnum responseEnum;
    private final Object[] args;

    public IResponseEnum getResponseEnum() {
        return responseEnum;
    }

    public Object[] getArgs() {
        return args;
    }

    public BaseException(IResponseEnum responseEnum,Object[] args,String message) {
        super(message);
        this.responseEnum= responseEnum;
        this.args = args;
    }

    public BaseException(IResponseEnum responseEnum,Object[] args,String message,Throwable cause) {
        super(message,cause);
        this.responseEnum= responseEnum;
        this.args = args;
    }
}
